import CalCountainer from './container/CalCountainer'
import CounterContro from './container/CounterContro'
import React from 'react'
import { BrowserRouter, Route, Redirect, Switch,Link} from 'react-router-dom'

import Home from './components/Home'
import './App.css'

export default class App extends React.Component{
  render(){ 
    return (
      <BrowserRouter >
      <div >
        <div className="box">
        <ul className="ul">
          <li><Link to="/"> Home</Link></li>
          <li><Link to="/counter">计数器</Link></li>                                                                                              
          <li><Link to="/cal">计算器</Link></li>
        </ul>
        </div>
      
      

          <Switch>
            <Route exact path="/" component={Home}/>
            <Route path="/cal" component={CalCountainer}/>

              
                                   
            <Route path="/counter" component={CounterContro}/>
                                    
                                                                                
          </Switch>
      
      </div>
      
      </BrowserRouter>
      )
  }
}
